package main

import (
	"fmt"
	"strconv"
	"time"
)

func main() {

	goodsID := []uint64{1, 2, 3, 4, 5}

	for _, id := range goodsID {
		//错误
		//go func() {
		//	fmt.Println(strconv.Itoa(int(id)))
		//}()
		go func(id uint64) {
			fmt.Println(strconv.Itoa(int(id)))
		}(id)
	}
	time.Sleep(time.Second * 3)
	//var out []*int
	//
	//for i := 0; i < 3; i++ {
	//	out = append(out, &i)
	//}
	//for _, value := range out {
	//	fmt.Println(*value)
	//}
}
